/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ebdesk.controller.dhkp;
import javax.swing.table.*;
/**
 *
 * @author mbenk
 */
public class DHKPTableModel extends AbstractTableModel{
    private Object[][] rowData;  
    private String[] columnNames;  

    public DHKPTableModel(Object[][] rowData, String[] columnNames) {  
        this.rowData = rowData;  
        this.columnNames = columnNames;  
    }  
    @Override
    public int getColumnCount() {
        return columnNames.length;
    }

    @Override
    public String getColumnName(int column) {
        return columnNames[column];
    }

    @Override
    public int getRowCount() {
        return rowData.length;
    }

    @Override
    public Object getValueAt(int row, int column) {
        return rowData[row][column];
    }
    
    @Override
    public void setValueAt(Object value, int row, int column) {
        rowData[row][column] = value;
    }
}
